package com.elysia.newsservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elysia.newsservice.domain.entity.GameVersion;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface GameVersionMapper extends BaseMapper<GameVersion> {
    /**
     * 根据版本号查询数据
     */
    @Select("SELECT * FROM game_version WHERE version = #{version}")
    GameVersion selectByVersion(String version);
    /**
     * 根据ID删除数据
     */
    @Delete("DELETE FROM game_version WHERE id = #{id}")
    void deleteById(Long id);
}
